<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use  Gregwar\Captcha\CaptchaBuilder;
use Session;
class CodeController extends Controller
{
   public function code($random = 1000)
   {
   	ob_end_clean();
   	$builder = new CaptchaBuilder;
   	$builder -> build();
   	Session::put('code',$builder->getPhrase());
   	header('Content-type:image/jpeg');
   	$builder -> output();
   }
}
